import {createRouter,createWebHistory,RouteRecordRaw} from 'vue-router'

const routes:Array<RouteRecordRaw> = [
    {
        path: '/',
        redirect: '/AddLogin'
    },
    {
        path: '/AddLogin',
        component: () => import('../components/AddLogin.vue')
    },
    {
        path: '/LoginDemo',
        component: () => import( '../components/LoginDemo.vue')
    },
    {
        path: '/ShowMember',
        component: () => import( '../components/ShowMember.vue')
    },
    {
        path: '/AdminLogin',
        component: () => import( '../components/AdminLogin.vue')
    },
    {
        path: '/MainDemo',
        component: () => import( '../components/MainDemo.vue'),
        children:[
            {
                path: '/MemberList',
                component: () => import('../views/member/MemberList.vue'),
            },
            {
                path: '/Memquan',
                component: () => import('../views/main/Memquan.vue'),
            },
            {
                path: '/Memlv',
                component: () => import('../views/maean/Memlv.vue'),
            },
            {
                path: '/MemlvAdd',
                component: () => import('../views/maean/MemlvAdd.vue'),
            },
            {
                path: '/Upd',
                component: () => import('../views/maean/Upd.vue'),
            },
            {
                path: '/Memquan',
                component: () => import('../views/main/Memquan.vue'),
            },
            {
                path: '/ShowRights',
                component: () => import('../views/main/ShowRights.vue'),
            }
        ]
    },
    {
        path: '/StoreList',
        component: () => import( '../components/StoreList.vue')
    },
    {
        path: '/ShowStore',
        component: () => import( '../components/ShowStore.vue')
    },
    {
        path: '/UptStore',
        component: () => import( '../components/UptStore.vue')
    },
    {
        path: '/Youhui',
        component: () => import('../components/Youhui.vue'),
    },
    {
        path: '/Memshow',
        component: () => import('../components/Memshow.vue'),
    },
    {
        path: '/Memxiugai',
        component: () => import('../components/Memxiugai.vue'),
    },
    {
        path: '/AddRoomType',
        component: () => import('../components/AddRoomType.vue'),
    },
    {
        path: '/ShowRoomType',
        component: () => import('../components/ShowRoomType.vue'),
    },
    {
        path: '/AddRoomPrice',
        component: () => import('../components/AddRoomPrice.vue'),
    },
    {
        path: '/ShowPlan',
        component: () => import('../components/ShowPlan.vue'),
    },
    {
        path: '/HouseState',
        component: () => import('../components/HouseState.vue'),
    },
    {
        path: '/IsTrueView',
        component: () => import('../components/IsTrueView.vue'),
    }
];

const router = createRouter({
    history:createWebHistory(),
    routes
})

export default router